using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
using System.Xml.Schema;
using System.Reflection;
using System.IO;

namespace Misc.Common.Exceptions
{
	class XmlReportHelper
	{
		XmlDocument _doc;

		public XmlReportHelper(string filename)
		{
			_doc = new XmlDocument();
			Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("ReportSchema.xsd");

			XmlSchema schema = XmlSchema.Read(stream, XmlValidationEventHandler);

			_doc.Schemas.Add(schema);


			if(System.IO.File.Exists(filename))
			{
				_doc.Load(filename);
			}
		}


		private void XmlValidationEventHandler(Object sender, ValidationEventArgs e)
		{
		}

	}
}
